
loginService.$inject = ['$http'];
function loginService($http) {
    var svc = {
        user:{}
    };

    var url = 'O2OAdministrator/api/login';
    function login(user){
        return $http.post(url,user);
    }

    function getUser(){
        return svc.user;
    }

    function setUser(user){
        svc.user = user;
    }

    return {
        setUser:setUser,
        getUser:getUser,
        login:login
    }
}
module.exports = loginService;